<?php

namespace app\admin\validate;

use think\Validate;

class Leave extends Validate
{
    protected $rule = [
        'name'             => 'require',
        'grade_id'          => 'require',
    ];

    protected $message = [
        'name.require'     => '姓名不能为空',
        'grade_id.require' => '班级不能为空',
    ];
    protected $scene = [
        'edit'  => ['id','name', 'grade_id','phone','reason','type','starting_time','finish_time','report_time','status'],
        'add'   => ['name', 'grade_id','phone','reason','type','starting_time','finish_time','report_time','status'],
    ];
}


